/*
 * IAnimationPlayer.cpp
 *
 *  Created on: 05.01.2012
 *      Author: Kirill Blinov
 *      Copyright: LGPL
 */

#include "IAnimationPlayer.h"
#include "IAnimationState.h"

IAnimationPlayer::IAnimationPlayer()
{

}

IAnimationPlayer::~IAnimationPlayer()
{

}

//---------------------------------//

CSimpleAnimationPlayer::CSimpleAnimationPlayer()
{

}

CSimpleAnimationPlayer::~CSimpleAnimationPlayer()
{

}

glm::mat4
CSimpleAnimationPlayer::PlayAnimation( CAnimationController &Controller )
{
	Controller.ResetAnimationIterator();

	IAnimationState* CurrentAnimation;
	while ( ( CurrentAnimation = Controller.GetNextAnimationState() ) != NULL )
	{
		CurrentAnimation->PlayAnimationStep();
	}

	return Controller.GetObjectWorldPosition();
}
